package com.xu.ai.mcp.syncserver.tools;

import org.springaicommunity.mcp.annotation.McpTool;
import org.springaicommunity.mcp.annotation.McpToolParam;
import org.springframework.stereotype.Service;

/**
 * @author xuguan
 * @since 2025/11/3
 */
@Service
public class CalculatorTool {

	@McpTool(name = "calculator", description = "计算两数之和", generateOutputSchema = true)
	public String calculate(@McpToolParam(required = true, description = "第一个数") int a,
								  @McpToolParam(required = true, description = "第二个数") int b) {
		return "计算结果为：" + a + b;
	}
}
